package com.nbsaas.boot.cms.rest.convert;

import com.nbsaas.boot.cms.data.entity.Article;
import com.nbsaas.boot.cms.api.domain.simple.ArticleSimple;

import com.nbsaas.boot.rest.api.Converter;

/**
* 文章-列表对象转换器
*/

public class ArticleSimpleConvert implements Converter<ArticleSimple, Article> {




@Override
public ArticleSimple convert(Article source) {
    ArticleSimple result = new ArticleSimple();

                result.setTemplate(source.getTemplate());
                result.setLikeCount(source.getLikeCount());
                result.setSource(source.getSource());
                result.setTitle(source.getTitle());
                result.setReadCount(source.getReadCount());
                result.setHot(source.getHot());
                result.setSeoTitle(source.getSeoTitle());
                result.setSeoKeywords(source.getSeoKeywords());
                result.setContent(source.getContent());
                result.setTop(source.getTop());
                result.setCoverImage(source.getCoverImage());
                result.setId(source.getId());
                result.setLastDate(source.getLastDate());
                result.setSummary(source.getSummary());
                result.setUrlAlias(source.getUrlAlias());
                result.setPublishTime(source.getPublishTime());
                result.setAccessLevel(source.getAccessLevel());
                result.setAuthor(source.getAuthor());
                result.setSeoDescription(source.getSeoDescription());
                result.setSort(source.getSort());
                result.setAddDate(source.getAddDate());
                result.setCommentCount(source.getCommentCount());
                result.setRecommended(source.getRecommended());
                result.setSubtitle(source.getSubtitle());
                result.setCategoryId(source.getCategoryId());
                result.setStatus(source.getStatus());


    return result;
}

}